package com.sportschain.app.mine.activity;

import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.RecyclerView;

import com.sportschain.app.R;
import com.sportschain.app.core.base.BaseActivity;
import com.sportschain.app.mine.adapter.ExchangeHistoryAdapter;
import com.sportschain.app.mine.bean.ExchangeBean;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class EnergyActivity extends BaseActivity {


    @BindView(R.id.exchange_history_rv)
    RecyclerView mExchangeHistoryRv;

    private ExchangeHistoryAdapter mAdapter;

    @Override
    public int getLayoutId() {
        return R.layout.activity_energy;
    }

    @Override
    public void initView() {
        mAdapter = new ExchangeHistoryAdapter();
        mAdapter.bindToRecyclerView(mExchangeHistoryRv);
        mExchangeHistoryRv.addItemDecoration(new DividerItemDecoration(mActivity, DividerItemDecoration.VERTICAL));
        mAdapter.setEmptyView(R.layout.empty_view_layout);
    }

    @Override
    public void initData() {
        List<ExchangeBean> data = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            data.add(new ExchangeBean());
        }
        mAdapter.setNewData(data);
    }

    @Override
    public void initListener() {

    }
}
